<?php
	$TEMP->set_file(array('handle' => DIR_VIEW_DEAN . 'tuitionFees.html'));
	
	$listCourses = $DSC->getListCourses($strAccDept);
	
	# LSITING
	if ( !empty($listCourses) ) {
		
		$TEMP->set_block('handle',  'courses', 'coursesRow');
		$bgcolor 	= LOOPING_F0F;
		$numCount 	= 1;
			
		foreach($listCourses as $listCoursesField => $listCoursesValue) {
			
			if ( $listCoursesValue['is_deleted'] == 'N') {
				$edButton = '<img src="' . DIR_IMAGES . 'icon/preview.png" border="0" title="Preview" class="cursor-pointer" onclick="popupRequest(\'show\', \'SubjectPrintPreview\', \'' . $listCoursesValue['course_desc'] . ' (' . $listCoursesValue['course_code'] . ')\', \'550\', \'1000\', \'' . $listCoursesValue['course_idPK'] . '\');"/>
							 &nbsp;<img src="' . DIR_IMAGES . 'icon/section.png" border="0" id="sem_img' . $listCoursesValue['course_idPK'] . '" onclick="linkNewPage(\'SemesterFees&cid=' . $listCoursesValue['course_idPK'] . '\')"/>
							';
			}
			else {
				$edButton = '&nbsp;&nbsp;<img src="' . DIR_IMAGES . 'icon/pencil_d.png" border="0" title="Edit"/>&nbsp;&nbsp;<img src="' . DIR_IMAGES . 'icon/recyclebin_d.png" title="Delete" border="0" />';
				$delButton = '<img src="' . DIR_IMAGES . 'icon/recyclebin_d.png" />';
			}
			
			$TEMP->set_var(array('course_id' 	=> $listCoursesValue['course_idPK'],
								 'course' 		=> $listCoursesValue['course_desc'],
								 'course_major'	=> (!empty($listCoursesValue['course_major'])) ? $listCoursesValue['course_major'] : '',
								 'course_code'	=> $listCoursesValue['course_code'],
								 'numbering'	=> $numCount,
								 'bgcolor'		=> $bgcolor,
								 'ed_button'	=> $edButton
								));
								
			$TEMP->parse('coursesRow', 'courses', true);
			$bgcolor = ($bgcolor == LOOPING_F0F) ? LOOPING_FFF : LOOPING_F0F;
			$numCount++;
		}
	}
	else {
			
		$TEMP->set_var(array('course_id' 	=> '',
							 'course' 		=> '',
							 'course_major'	=> '',
							 'course_code'	=> '',
							 'numbering'	=> '',
							 'bgcolor'		=> '',
							 'ed_button'	=> ''
							));
	}
	
	$TEMP->set_var(array('search' 			=> $search,
						 'results'			=> "<strong>" . $listCountPersonalInformation . "</strong> results",
						 'urlPage'			=> $urlPage,
						 'dean_sub_menu'	=> $pageLib->deanSubMenu(DIR_IMAGES),
						 'dept_course'		=> $strAccCourse,
						));
?>